#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
__title__ = ''
__author__ = 'Dell'
__mtime__ = '2018-01-04'
# code is far away from bugs 
"""
import qrcode


def SimpleUsage():
    img = qrcode.make("http://zhangliqing.cn")
    img.save('zlq.png')


def MoreUsage():
    qr = qrcode.QRCode(
        version=1,
        error_correction=qrcode.constants.ERROR_CORRECT_L,
        box_size=10,
        border=4,
    )
    qr.add_data('http://www.xgezhang.com')
    qr.make(fit=True)
    img = qr.make_image()
    img.save('xgezhang.png')


if __name__ == "__main__":
    SimpleUsage()
